/*********************************************************************************
 *      Copyright:  (C) 2021 iot
 *                  All rights reserved.
 *
 *       Filename:  time.c
 *    Description:  This file 
 *                 
 *        Version:  1.0.0
 *         Author:  mk 
 *                 
 ********************************************************************************/
#include <stdio.h>
#include <time.h>
#include <string.h>


void get_time(char *buf)
{
    time_t rawtime;
    struct tm *info;
    char buffer[80];

    time( &rawtime );

    info = localtime( &rawtime );

    strftime(buffer, 80, "%Y-%m-%d %H:%M:%S", info);
    strcpy(buf, buffer);

    return ;
}

